package top.canyue.eca_manager.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;

import java.sql.Timestamp;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Conference {
    @Id
    private String id;
    @NonNull
    private String name;
    private String address;
    private Timestamp startTime;
    private Timestamp endTime;
    private String comm;
    @NonNull
    private boolean isDelete;
    @NonNull
    private Timestamp createTime;
    private Timestamp updateTime;
    @NonNull
    private boolean persistent;

    @Transient
    private Integer offset;
    @Transient
    private Integer fetchSize;
    @Transient
    private String orders;

    @Override
    public String toString() {
        return "{" +
                "'id':'" + id + '\'' +
                ", 'name':'" + name + '\'' +
                ", 'address':'" + address + '\'' +
                ", 'startTime':'" + startTime + '\'' +
                ", 'endTime':'" + endTime + '\'' +
                ", 'comm':'" + comm + '\'' +
                ", 'isDelete':" + isDelete +
                ", 'persistent':" + persistent +
                ", 'createTime':'" + createTime + '\'' +
                ", 'updateTime':'" + updateTime + '\'' +
                '}';
    }

    public boolean getPersistent() {
        return this.persistent;
    }
}
